package net.alegen.android.pizzashop.ui;

import net.alegen.android.pizzashop.R;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class ContactActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.contact_activity);
        
        ((Button)this.findViewById(R.id.btnCall)).setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				try {
			        Intent callIntent = new Intent(Intent.ACTION_CALL);
			        callIntent.setData(Uri.parse("tel:0123456789"));
			        ContactActivity.this.startActivity(callIntent);
			    } catch (Exception e) { }
			}
		});
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.contact_activity, menu);
        return true;
    }
}
